<template>

    <div class="right" @click="changeLanguage">
        <el-button type="success" plain>切换语言</el-button>
    </div>

    <div>{{ $t('submit.ok') }}</div>
    <div>{{ $t('save.ok') }}</div>
    <div>{{ $t('submit') }}</div>
    <el-calendar :range="[new Date(2019, 2, 4), new Date(2019, 2, 24)]" />

    <el-row class="mb-4">
        <el-button>Default</el-button>
        <el-button type="primary">Primary</el-button>
        <el-button type="success">Success</el-button>
        <el-button type="info">Info</el-button>
        <el-button type="warning">Warning</el-button>
        <el-button type="danger">Danger</el-button>
        <el-button>中文</el-button>
    </el-row>

    <el-row class="mb-4">
        <el-button plain>Plain</el-button>
        <el-button type="primary" plain>Primary</el-button>
        <el-button type="success" plain>Success</el-button>
        <el-button type="info" plain>Info</el-button>
        <el-button type="warning" plain>Warning</el-button>
        <el-button type="danger" plain>Danger</el-button>
    </el-row>

    <el-row class="mb-4">
        <el-button round>Round</el-button>
        <el-button type="primary" round>Primary</el-button>
        <el-button type="success" round>Success</el-button>
        <el-button type="info" round>Info</el-button>
        <el-button type="warning" round>Warning</el-button>
        <el-button type="danger" round>Danger</el-button>
    </el-row>

    <el-row>
        <el-button :icon="Search" circle />
        <el-button type="primary" :icon="Edit" circle />
        <el-button type="success" :icon="Check" circle />
        <el-button type="info" :icon="Message" circle />
        <el-button type="warning" :icon="Star" circle />
        <el-button type="danger" :icon="Delete" circle />
    </el-row>
</template>
<script setup>
import { reactive } from 'vue';
import {
    Check,
    Delete,
    Edit,
    Message,
    Search,
    Star,
} from '@element-plus/icons-vue' 
import { useRouter } from 'vue-router';
import EventBus from 'utils/EventBus.js'


const router = useRouter()

const data = reactive({
    curLanguage: 'zh-CN',
})

const changeLanguage = () => {
    data.curLanguage = data.curLanguage === 'zh-CN' ? 'en-US' : 'zh-CN' 
    EventBus.emit('setLocale',  data.curLanguage)
}

</script>
<style lang="less" scoped>
</style>